{extends file="./main.tpl"}
{block name=head}
<script type="text/javascript">
$(document).ready(function() {
	$(".add").blur(function()
	{
	  if($(".add:last").val() != '' && $(".add:last").val() > 0)
	  {
      $("#one").clone(true).appendTo("#mainDiv")
      .find('input[type="text"]').val('').end()
      .find('select[option=""]').val('');
    }
  });
});
function myFunction()
{
  if(confirm("You Want To Remove This Record")== true)
	{
		return true;
	}
	else
	{
		return false;
	}
}
</script>
{/block}
{block name=body}
<form name="party" action="{$smarty.server.PHP_SELF}" method="post" onsubmit="return confirm('Do You Want To Submit !!!!!')";>
<table align="center" border="2" cellpadding="2" cellspacing="2" width="" >
<tr>
  <td align="center" class="table1" colspan="4"><b>Godown Issues</b></td>
</tr>
<tr>
	<td class="table2" align="center">Issuse No.</td>
	<td class="table2" align="center">Date</td>
	<td class="table2" align="center">Issued to party</td>
	<td class="table2" align="center" colspan="2">Cons No</td>
</tr>
<tbody id="mainDiv">
<tr id="one">
  <td align="center" class="table2"><input type="text" name="issueNo[]" class="add" autofocus required />
  </td>
  <td class="table2">{html_select_date field_array="curDate[]" prefix="" start_year ="-0" end_year="+2" field_order="DMY" month_format="%m" day_value_format="%02d"}</td>
  <td class="table2">
    <select name="partyId[]">
    	<option>select party</option>
      {html_options values=$partyArray.partyId output=$partyArray.name}
    </select>
  </td>
  <td align="left" class="table2" colspan="2"><input type="text" name="consRecived[]"/>
  </td>
</tr>
</tbody>
<tr>
	<td colspan="6" align="center" class="table1"><input type="submit" value="Submit" name="submit" class="button"></td>
</tr>
</table>
</form>
{/block}